<%@ include file="/WEB-INF/common/taglibs.jsp"%>
<div><img src="<c:url value="/images/share-links.png" />" /><br />
<a href="<c:url value="/cities.htm" />"><img
	src="<c:url value="/images/cities.png" />" /></a></div>
<div class="ui-dialog-titlebar ui-widget-header ui-corner-all"
	style="float: center; margin: 0 auto;"><c:choose>
	<c:when test="${empty deals}">
		<c:if test="${param.index gt 1}">&nbsp;&nbsp;<a
				href="<c:url value="/deals.htm?city=${param.city}&index=${param.index-1}"/>">Previous&nbsp;Page</a>
		</c:if>
		<c:if test="${param.index eq 1}">No deals found in ${param.city}.</c:if>
	</c:when>
	<c:otherwise>
		Deals in ${param.city}.
		<c:if test="${param.index gt 1}">&nbsp;&nbsp;<a
				href="<c:url value="/deals.htm?city=${param.city}&index=${param.index-1}"/>">Previous&nbsp;Page</a>
		</c:if>
		<c:if test="${fn:length(deals) eq 9}">&nbsp;&nbsp;<a
				href="<c:url value="/deals.htm?city=${param.city}&index=${param.index+1}"/>">Next&nbsp;Page</a>
		</c:if>
	</c:otherwise>
</c:choose></div>
<c:forEach var="deal" items="${deals}">
	<div class="ui-widget ui-widget-content widget-deal"
		style="width: 230px; height: 195px; margin-left: 3px; margin-top: 3px;">
	<div class="deal-header"><font class="city">City:${deal.city}</font>&nbsp;<font
		class="from">from:${deal.source}</font></div>
	<div class="deal-title">${deal.title}</div>
	<div class="deal-body">
	<div class="title">
	<ul>
		<li>Price: ${deal.price}</li>
		<li>Value: ${deal.retailValue}</li>
		<li>Saving: ${deal.discount}</li>
	</ul>
	</div>
	<div class="pic"><img alt="${deal.title}" src="${deal.image}" /></div>
	</div>
	<div class="deal-footer"><font class="title">Time Left:</font>&nbsp;<font
		class="content">${deal.timeLeft}</font><br />
	<a href="${deal.link}" target="_blank">GO</a></div>
	</div>
</c:forEach>
